<?php

//MIPJZ.COM [Don't forget the beginner's mind]

//Copyright (c) 2017~2099 http://MIPJZ.COM All rights reserved.

namespace addons\spiderOneMore\controller;

use think\Request;
use think\Loader;

use app\common\controller\AdminBase;

class ApiAdminSpiderOneMore extends AdminBase
{

    public function itemList()
    {
      	$page = input('post.page');
		$limit = input('post.limit');
		$orderBy = input('post.orderBy');
		$order = input('post.order');
		if (!$page) {
		  $page = 1;
		}
		if (!$limit) {
		  $limit = 10;
		}
		if (!$orderBy) {
		 $orderBy = 'id';
		}
		if (!$order) {
			$order = 'desc';
		}
	    $spidersList = db('SpiderOneMore')->limit($limit)->page($page)->order($orderBy, $order)->select();
	    return jsonSuccess('',['spidersList' => $spidersList,'total' => db('SpiderOneMore')->count(),'page' => $page]);
    }


}